#define _Tracers_cpp_
#include "Definitions.h"
#include "Simulator.h"
#include "Outports.h"
#include "Inports.h"
#include "Controllers.h"
#include "Signals.h"
#include "Registers.h"
#include "Tracers.h"
#include "Displays.h"
#include "OutportDynamicList.h"

using namespace std;

// TODO: determine buffer size from width of signal being traced
#define BUFFER_SIZE 1024
char DisplayBuffer[BUFFER_SIZE];


void Display_directiveexpression82::Evaluate(void)
{
      switch(Simulator::controller_test_paddle_ctrl->CurrentControlStep)
      {
      case 0:
        printf("%i", Simulator::CurrentCycle);
        printf(", paddle_y: ");
    Debug::Assert(Simulator::outPort_paddle_paddle_y->Cycle == Simulator::CurrentCycle);
        Simulator::outPort_paddle_paddle_y->Value->ToDecimalString(DisplayBuffer, BUFFER_SIZE);
        printf("%s", DisplayBuffer);
        printf("\n");
        break;
      }
}

void Display_directiveexpression82::Initialize(void)
{
}

void Display_directiveexpression95::Evaluate(void)
{
      switch(Simulator::controller_test_paddle_ctrl->CurrentControlStep)
      {
      case 1:
        printf("%i", Simulator::CurrentCycle);
        printf(", paddle_y: ");
    Debug::Assert(Simulator::outPort_paddle_paddle_y->Cycle == Simulator::CurrentCycle);
        Simulator::outPort_paddle_paddle_y->Value->ToDecimalString(DisplayBuffer, BUFFER_SIZE);
        printf("%s", DisplayBuffer);
        printf("\n");
        break;
      }
}

void Display_directiveexpression95::Initialize(void)
{
}

void Display_directiveexpression108::Evaluate(void)
{
      switch(Simulator::controller_test_paddle_ctrl->CurrentControlStep)
      {
      case 2:
        printf("%i", Simulator::CurrentCycle);
        printf(", paddle_y: ");
    Debug::Assert(Simulator::outPort_paddle_paddle_y->Cycle == Simulator::CurrentCycle);
        Simulator::outPort_paddle_paddle_y->Value->ToDecimalString(DisplayBuffer, BUFFER_SIZE);
        printf("%s", DisplayBuffer);
        printf("\n");
        break;
      }
}

void Display_directiveexpression108::Initialize(void)
{
}
